<?php
/**
 * @Author    紫梦
 * @DateTime  2018-02-09
 * @copyright 响响租车
 * @license   [license]
 * @version   1.0
 * @param     string     $value [description]
 */
namespace app\common\controller;
use app\common\model\Cars;
use app\common\request\ClientLai;
use \think\Db;
use app\common\exception\DefinedException;
use app\common\enums\ResultEnum;
use app\common\utils\ResultVOUtil;

class OperateTemp
{
	public static function operation($config,$car_unique_id,$instruct,$action,$url)
    {
       
        $obj = new ClientLai($config['user_name'],$config['password']);
     
        $data['car_unique_id'] = $car_unique_id;
        $data['seq_id'] = md5(time());
        $data['command'] = $instruct;
        $data['action'] = $action;
        $data['time'] = time()*1000;
        $res = $obj->request_post($url,http_build_query($data));
        $arr = json_decode($res,true);
        return ResultVOUtil::success($arr);
    }
}